import 'package:flutter/material.dart';
import 'package:jingyuan/pages/book/PdfItem.dart';
import 'package:pdfrx/pdfrx.dart';

class PdfViewerPage extends StatefulWidget {
  PdfViewerPage({super.key, required this.data});

  PdfItem data;

  @override
  State<PdfViewerPage> createState() => _PdfViewerPageState();
}

class _PdfViewerPageState extends State<PdfViewerPage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.data.title),
      ),
      body: PdfViewer.asset(
        widget.data.path,
      ),
    );
  }
}
